package com.yuyue.springFramework.note07.entity;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Conditional;
import org.springframework.context.annotation.Configuration;

/**
 * 注册配置类，不注册bean
 */
@Configuration
public class Configuration2 {

    //使用条件注解，以自定义的条件是false的Condition 实现类作为条件
    @Conditional(MyCondition1.class)
    @Bean
    public String configuretionBean2(){
        return "鱼跃";
    }

    @Bean
    public String configuretionBean3(){
        return "鸟飞";
    }
}
